﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public static class DictionaryExtend
{
    public static T GetValue<T, I>(this Dictionary<I, T> dic, I key ) {
        T value = default(T);

        if (dic.TryGetValue(key, out value))
        {
            return value;
        }
        else {
            Debug.Log("Dictionary.Getvalue扩展方法：字典中不存在key");
        }

        return value;
    }
}
